package com.clay.appointment.entity.hospital;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.clay.appointment.common.annotation.EnableAutoFillField;
import com.clay.appointment.common.annotation.TableHead;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 医院设置表
 * </p>
 *
 * @author clay
 * @since 2021-07-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("hospital_set")
@ApiModel(value = "Set对象", description = "医院设置表")
@ToString
@EnableAutoFillField
public class HospitalSet implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "医院名称")
    @TableHead("医院名称")
    private String hospitalName;

    @ApiModelProperty(value = "医院编号")
    @TableHead("医院编号")
    private String hospitalCode;

    @ApiModelProperty(value = "api基础路径")
    @TableHead("api基础路径")
    private String apiUrl;

    @ApiModelProperty(value = "签名秘钥")
    private String signKey;

    @ApiModelProperty(value = "联系人")
    @TableHead("联系人")
    private String contactsName;

    @ApiModelProperty(value = "联系人手机")
    @TableHead("联系人手机")
    private String contactsPhone;

    @ApiModelProperty(value = "状态(true:锁定,false:未锁定)")
    @TableHead("状态")
    private Boolean status;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JSONField
    private Date updateTime;

    @ApiModelProperty(value = "逻辑删除(true:已删除，false:未删除)")
    @TableLogic
    private Boolean deleted;
}
